package com.hzzy.IDao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.hzzy.bean.HzMenu;
import com.hzzy.bean.HzMenuExample;

public interface HzMenuMapper {
    int countByExample(HzMenuExample example);

    int deleteByExample(HzMenuExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(HzMenu record);

    int insertSelective(HzMenu record);

    List<HzMenu> selectByExample(HzMenuExample example);

    HzMenu selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") HzMenu record, @Param("example") HzMenuExample example);

    int updateByExample(@Param("record") HzMenu record, @Param("example") HzMenuExample example);

    int updateByPrimaryKeySelective(HzMenu record);

    int updateByPrimaryKey(HzMenu record);
    
   /* 自定义 */
    
    /**
     * 根据条件获取数据
     * @param conditions
     * @return
     */
    List<HzMenu> selectStudentMenuByContidions(Map<String, Object> conditions);
    
    /**
     * 根据寝室长  获取菜单
     * @param conditions
     * @return
     */
    List<HzMenu> selectStudnetMenuByDormitoryLeader(Map<String, Object> conditions);
    
    List<HzMenu> selectTeacherMenuByConditions(Map<String, Object> conditions);
    /**
     * 根据职位类型获取子菜单数据
     * @param parentId
     * @return
     */
    List<HzMenu> selectByConditons(Map<String, Object> conditions);
    
    /**
     * 搜索所有父级菜单
     * @return
     */
    List<HzMenu> selectAllParentMenu(Map<String, Object> conditions);
    
}